can-autorender

  • module
can/view/autorender.can-autorender

{Attribute}

 

Mark a script or other element as a template that should be rendered automatically.

<script can-autorender type='text/TYPE'>CONTENT< /script>

Renders the content of the script tag with a specified content.

Parameters

  1. TYPE {String}

    The template engine type. It should be one of ejs, mustache and stache.

  2. CONTENT {String}

    The content to be rendered.

<TAG can-autorender type='text/TYPE'>CONTENT</TAG>

Renders the contents of the element as a template and replaces the original contents. Note: This does not currently work perfectly with any current templating engine. However, this will likely change.

Parameters

  1. TYPE {String}

    The template engine type. It should be one of ejs, mustache and stache.

Use

Read more about using this tag on can.autorender.